<div class="managedfunds form">
<?php
    if($this->Session->read('login')=='yes')
    {
        echo $this->Form->create('Managedfund'); ?>

        <fieldset>
		<legend><?php echo __('Add Managed Funds'); ?></legend>
	    <?php
	    	echo $this->Form->input('FundsID', array('label' => 'Fund ID' ));
		    echo $this->Form->input('FundName', array('label' => 'Fund Name')); 
		    echo $this->Form->input('APIRCode', array('label' => 'APIR Code (eg. AAA0001AU)', 'type' => 'select', 'options' => $apir ));
			?>
<div class="well">
  <div id="datetimepicker4" class="input-append">
	<p>Date</p>
    <input data-format="yyyy-mm-dd" type="text"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
</div>
<script type="text/javascript">
  $(function() {
    $('#datetimepicker4').datetimepicker({
      pickTime: false
    });
  });
</script>
<?php
		    echo $this->Form->input('AssignStatus', array('label' => 'Assigned? (Tick for Yes)', 'type'=> 'checkbox'));
			echo $this->Form->input('AssignedPortfolios', array('label' => 'Assigned To? (Portfolios)','type' => 'select', 'options' => $portfolios));
		    echo $this->Form->input('Value', array('label' => 'Value', 'type' => 'text'));
		    echo $this->Form->input('Weighting', array('label' => 'Weighting (%)', 'type' => 'text'));		 
	    ?>
	    </fieldset>

	 <!--APIRCode is selected, corresponding Fund Name should be displayed in Fund Name field automatically, else, it will be blank
	   if Assigned Status Checkbox is selected, Assigned Portfolio List will appear to be editable, else, it will be disabled -->

        <?php echo $this->Form->end(__('Submit')); ?>
        </div>
        <div class="actions">
	        <h3><?php echo __('Actions'); ?></h3>
	        <ul>
		        <li><?php echo $this->Html->link(__('List Managedfunds'), array('action' => 'index')); ?></li>
	        </ul>
        </div>
<?php
    }else
    {
?>
        <p>You can't view the content in this page</p>
<?php
    }
?>